﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JinJun.YShow.Core;
using JinJun.YShow.Model;
using Newtonsoft.Json;

namespace JinJun.YShow.Romote
{
    public class HttpGetApi
    {
        /// <summary>
        /// 调用接口
        /// </summary>
        /// <param name="adminUser"></param>
        /// <returns></returns>
        public AdminUser ValidateLogin(AdminUser adminUser)
        {
            string url = ConfigurationManager.AppSettings["apiUrl"] + "/api/login?moduleName=歪秀&username=" + adminUser.Name + "&pwd=" + adminUser.Password;
            string result = HttpHelper.PostJson(url, string.Empty);
            return JsonConvert.DeserializeObject<AdminUser>(result);
        }
    }
}
